package cn.shyouchi.wuguanjia.android.api.meet;

import java.util.List;
import java.util.Map;

import cn.shyouchi.wuguanjia.android.model.BaseRequestResult;
import cn.shyouchi.wuguanjia.android.model.BaseResult;
import cn.shyouchi.wuguanjia.android.ui.meetting.common.MeetPerson;
import cn.shyouchi.wuguanjia.android.ui.meetting.common.MeetRoom;
import cn.shyouchi.wuguanjia.android.ui.meetting.feedback.FeedbackDetailEntity;
import cn.shyouchi.wuguanjia.android.ui.meetting.feedback.FeedbackEntity;
import cn.shyouchi.wuguanjia.android.ui.meetting.plan.PlanMeetDetailEntity;
import cn.shyouchi.wuguanjia.android.ui.meetting.plan.PlanMeetEntity;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by Eenie on 2017/2/11 at 10:45
 * Email: 472279981@qq.com
 * Des:
 */

public interface MeetService {


    /**
     * 获取会议人员
     *
     * @param token
     * @return
     */
    @GET("conferencePersonnel")
    Observable<BaseRequestResult<List<MeetPerson>>> fetchCrew(@Header("token") String token);

    @GET("departmentList")
    Observable<BaseRequestResult<List<MeetPerson>>> fetchDepartment(@Header("token") String token);

    @GET("application_roomList")
    Observable<BaseRequestResult<List<FeedbackEntity>>> fetchRoomList(@Header("token") String token);

    @GET("meeting/{path}")
    Observable<BaseResult<List<PlanMeetEntity>>> fetchMeets(@Header("token") String token, @Path("path") String type);

    @GET("meeting_roomList")
    Observable<BaseRequestResult<List<MeetRoom>>> fetchMeetRoom(@Header("token") String token, @QueryMap Map<String, Object> params);

    @GET("application_roomList/info")
    Observable<BaseRequestResult<FeedbackDetailEntity>> fetchMeetRoomInfo(@Header("token") String token, @Query("applicationid") int roomId);

    @GET("meeting/checkin")
    Observable<BaseRequestResult<String>> MeetCheckIn(@Header("token") String token, @Query("meetingid") int meetId);

    @GET("meeting/number")
    Observable<BaseRequestResult<List<MeetPerson>>> fetchMeetCheckPerson(@Header("token") String token, @Query("meetingid") int meetId);

    @GET("meeting/info")
    Observable<BaseRequestResult<PlanMeetDetailEntity>> fetchMeetInfo(@Header("token") String token, @Query("id") int roomId);

    @FormUrlEncoded
    @POST("meetingAdd")
    Observable<BaseRequestResult<String>> meetAdd(@Header("token") String token, @Field("data") String data);

    @FormUrlEncoded
    @POST("application_roomAdd")
    Observable<BaseRequestResult<String>> meetAplly(@Header("token") String token, @Field("data") String data);


    @Multipart
    @POST("meetingMinutes")
    Observable<BaseRequestResult<String>> addMeetRecord(@Header("token") String token,
                                                        @PartMap Map<String, RequestBody> params,
                                                        @Part List<MultipartBody.Part> imgs);


}
